home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / Interfaces&Libraries / Interfaces / CIncludes / string.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-17  |  2.3 KB  |  106 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     String.h
  4.     String handling
  5.     
  6.     Copyright Apple Computer,Inc.  1987-1990, 1993-1996
  7.     All rights reserved
  8.  
  9. ************************************************************/
  10.  
  11.  
  12. #ifndef __STRING__
  13. #define __STRING__
  14.  
  15. /*
  16.  * Get common declarations 
  17.  */
  18.  
  19. #include <NullDef.h>
  20. #include <SizeTDef.h>
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26.  
  27. #if defined (__powerc) || defined (powerc) || defined (__CFM68K__)
  28.     #pragma import on
  29. #endif
  30.  
  31. /*
  32.  *    Copying functions
  33.  */
  34.  
  35. void *memcpy (void *s1, const void *s2, size_t n);
  36. void *memmove (void *s1, const void *s2, size_t n);
  37. char *strcpy (char *s1, const char *s2);
  38. char *strncpy (char *s1, const char *s2, size_t n);
  39.  
  40. /* Apple library extentions.  The prefered mechanism for enabling these is by defining
  41.  * __useAppleExts__.  In the absence of this symbol, the __STDC__ symbol is used to 
  42.  * enable or disable these extentions. */
  43.  
  44. /* CFront can't handle the pretty version of this conditional 
  45. #if defined (__useAppleExts__) || \
  46.     ((defined (applec) && ! defined (__STDC__)) || \
  47.      (defined (__PPCC__) && __STDC__ == 0))
  48. */
  49. #if defined (__useAppleExts__) || ((defined (applec) && ! defined (__STDC__)) || (defined (__PPCC__) && __STDC__ == 0))
  50.  
  51. void *memccpy(void *s1, const void *s2, int c, size_t n);
  52.  
  53. #endif
  54.  
  55. /*
  56.  *    Concatenation functions
  57.  */
  58.  
  59. char *strcat (char *s1, const char *s2);
  60. char *strncat (char *s1, const char *s2, size_t n);
  61.  
  62. /*
  63.  *    Comparison functions
  64.  */
  65.  
  66. int memcmp (const void *s1, const void *s2, size_t n);
  67. int strcmp (const char *s1, const char *s2);
  68. int strcoll (const char *s1, const char *s2);
  69. int strncmp (const char *s1, const char *s2, size_t n);
  70. size_t strxfrm (char *s1, const char *s2, size_t n);
  71.  
  72.  
  73. /*
  74.  *    Search functions
  75.  */
  76.  
  77. void *memchr (const void *s, int c, size_t n);
  78. char *strchr (const char *s, int c);
  79. size_t strcspn (const char *s1, const char *s2);
  80. char * strpbrk (const char *s1, const char *s2);
  81. char *strrchr (const char *s, int c);
  82. size_t strspn (const char *s1, const char *s2);
  83. char *strstr (const char *s1, const char *s2);
  84. char *strtok (char *s1, const char *s2);
  85.  
  86.  
  87. /*
  88.  *    Miscellaneous functions
  89.  */
  90.  
  91. void *memset (void *s, int c, size_t n);
  92. char *strerror (int errnum);
  93. size_t strlen (const char *s);
  94.  
  95.  
  96. #if defined (__powerc) || defined (powerc) || defined (__CFM68K__)
  97.     #pragma import off
  98. #endif
  99.  
  100.  
  101. #ifdef __cplusplus
  102. }
  103. #endif
  104.  
  105. #endif
  106.